//
//  RootViewController.m
//  HandheldHospital
//
//  Created by zhangchao on 16/2/25.
//  Copyright © 2016年 zhangchao. All rights reserved.
//

#import "RootViewController.h"
#import "OnlineConsultingController.h"
#import "NearbyHospitalController.h"
#import "MyController.h"

@interface RootViewController ()

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NearbyHospitalController *nearbyHospitalC = [[NearbyHospitalController alloc] init];
    UINavigationController *nearbyHospitalNC = [[UINavigationController alloc] initWithRootViewController:nearbyHospitalC];
    nearbyHospitalNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"附近医院" image:[UIImage imageNamed:@"10-medical.png"] tag:101];
    
    OnlineConsultingController *onlineConsultingC = [[OnlineConsultingController alloc] init];
    UINavigationController *onlineConsultingNC = [[UINavigationController alloc] initWithRootViewController:onlineConsultingC];
    onlineConsultingNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"在线咨询" image:[UIImage imageNamed:@"09-chat2.png"] tag:102];
    
    
    MyController *myC = [[MyController alloc] init];
    UINavigationController *myNC = [[UINavigationController alloc] initWithRootViewController:myC];
    myNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"我的" image:[UIImage imageNamed:@"29-heart.png"] tag:103];
    myNC.hidesBottomBarWhenPushed = (myNC.childViewControllers.count >1);
    self.viewControllers = @[nearbyHospitalNC,onlineConsultingNC,myNC];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
